/**
 * @author : 乔磊磊
 * @date   : 2025/6/9 11:16
 * @Desc   :
 */
// @ts-ignore
import {DEBUG} from "cc/env"
import * as qlResMgr from "./core/asset"
import * as qlAudioMgr from "./core/audio"
import * as qlComponent from "./core/component";
import * as qlEvent from "./core/event";
import * as qlLog from "./core/log";
import * as qlPlatform from "./core/platfrom";
import * as qlStorage from "./core/storage";
import * as qlTween from "./core/tween";
import * as qlUtil from "./core/util";
import * as qlExportJson from "./exportJson"

// @ts-ignore
const _globalThis = typeof global === 'undefined' ? globalThis : global;
const _global = typeof window === 'undefined' ? _globalThis : window;

export const ql = {
    _global : _global,
    debug: qlLog,
    logger: qlLog.logger,
    resMgr: qlResMgr,
    getAudioMgr: qlAudioMgr.getAudionMgr,
    EventComponent: qlComponent.EventComponent,
    UIAudioBtn: qlComponent.UIAudioBtn,
    RollNumber: qlComponent.RollNumber,
    eventMgr: qlEvent.eventMgr,
    keepScreenOn: qlPlatform.keepScreenOn,
    storageMgr: qlStorage.storageMgr,
    bezierTo: qlTween.bezierTo,
    jumpTo: qlTween.jumpTo,
    strAndNumUtil: qlUtil.StrAndNumUtil,
    arrUtil: qlUtil.ArrUtil,
    dateUtil: qlUtil.DateUtil,
    creatJsonFile: qlExportJson.creatJsonFile,
    saveJsonByBrowser: qlExportJson.saveForBrowser,
};
if (DEBUG) {
    // @ts-ignore
    _global.ql = ql
}
